//
//  WebSocketConnection.m
//  WebServerTools
//
//  Created by 夏利兵 on 2020/9/23.
//  Copyright © 2020 com.lbx. All rights reserved.
//

#import "WebSocketConnection.h"
#import <WebSocket.h>

@implementation WebSocketConnection

/**
 * Overrides method in HTTPConnection.
 **/
- (WebSocket *)webSocketForURI:(NSString *)path
{
    if ( [path isEqualToString:@"/requestLog"] )
    {
        // Create the WebSocket
        WebSocket *webSocket = [[WebSocket alloc] initWithRequest:request socket:asyncSocket];
        return webSocket;
    }
    return [super webSocketForURI:path];
}

@end
